import java.util.LinkedList;

public class Test {

    //拆箱
    public static void main(String[] args) {
        Integer val1 = 10;
        int a = val1;//自动拆箱
        System.out.println(a);

        int b = val1.intValue();//显示拆箱
        System.out.println(b);

        double d = val1.doubleValue();
    }
    //装箱
    public static void main2(String[] args) {
        int a = 10;
        Integer val = a;//自动装箱
        Integer val2 = Integer.valueOf(a);//显示装箱
        Integer val3 = new Integer(a);//显示装箱
        System.out.println(val);
    }
    public static void main1(String[] args) {
        LinkedList<String> linkedList = new LinkedList<>();
        //尖括号里面放的指定的数据类型
        linkedList.add("hello");
        //linkedList.add(10);

        //包装类
        LinkedList<Integer> linkedList1 = new LinkedList<>();
        linkedList1.add(10);
    }
}
